package week7.springboot.service;

import com.baomidou.dynamic.datasource.annotation.DS;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@DS("shopping2")
@Service
public class Service2 {

    @Autowired
    private JdbcTemplate template;

    public void test() {

        List<Map<String, Object>> maps = template.queryForList("select * from product");
        System.out.println(maps.get(0));

    }

}
